'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.post('/login', controller.login.login);
  router.post('/logout', controller.login.logout);
  router.get('/', controller.home.index);
  router.get('/info', controller.user.info);
  router.get('/role', controller.role.getList);
  router.resources('user', '/user', controller.user);
  router.resources('education', '/education', controller.education);
  router.resources('grade', '/grade', controller.grade);
  router.resources('school', '/school', controller.school);
  router.resources('student', '/student', controller.student);
  router.get('/test', controller.home.test);
};
